<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>


<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>电子书城</title>
<link rel="stylesheet" href="css/main.css" type="text/css" />
<script type="text/javascript" src="${pageContext.request.contextPath}/js/jquery-2.1.0.js"></script>

</head>

<body class="main">

	<jsp:include page="head.jsp" />

	<jsp:include page="menu_search.jsp" />


	<div id="divpagecontent">
		<table width="100%" border="0" cellspacing="0">
			<tr>

				<td><div style="text-align:right; margin:5px 10px 5px 0px">
						<a href="index.html">首页</a>&nbsp;&nbsp;&nbsp;&nbsp;&gt;&nbsp;&nbsp;&nbsp;<a
							href="product_list.html">&nbsp;${c.cname }</a>&nbsp;&nbsp;&nbsp;&nbsp;&gt;&nbsp;&nbsp;&nbsp;&nbsp;${p.pname }
					</div>





					<table cellspacing="0" class="infocontent">
						<tr>
							<td><img src="ad/page_ad.jpg" width="645" height="84" />

								<table width="100%%" border="0" cellspacing="0">
									<tr>
										<td width="30%">

											<div class="divbookcover">
												<p>
													<img src="${p.pimage }"
														width="213" height="269" border="0" />
												</p>
											</div>

											<div style="text-align:center; margin-top:25px">
												<span onclick="buy();">
													<img src="images/buybutton.gif" border="0" /> 
												</span>
											</div></td>
										<td style="padding:20px 5px 5px 5px"><img
											src="${p.pimage }" width="16" height="13" /><font
											class="bookname">&nbsp;&nbsp;${p.pname }</font>

											<hr />售价：<font color="#FF0000">${p.shop_price }</font>&nbsp;&nbsp;参考价格：<font style="text-decoration: line-through;">${p.market_price }</font>
											<hr/>
											
											
												购买数量：<input type="button" value='-'
															style="width:20px">

															<input name="text" type="text" id="buyNum"  value=1
															style="width:40px;text-align:center" /> <input
															type="button" value='+' style="width:20px"> 
											<hr /> 类别：${c.cname }

											<hr />
											<p>
												<b>内容简介：</b>
											</p> ${p.pdesc }</td>
									</tr>
								</table></td>
						</tr>
					</table>
				</td>
			</tr>
		</table>
	</div>

	<jsp:include page="foot.jsp" />
</body>
<script type="text/javascript">
function buy(){
	var buyNum=$("#buyNum").val();
	window.location.href="${pageContext.request.contextPath}/productServlet?action=addProductToCart&pid=${p.pid}&buyNum="+buyNum+"";
	
}
</script>
</html>
